//  XJAFNCliect.h
//  XJMCustomer
//  Created by Mr.hu on 2017/10/9.
//  Copyright © 2017年 Mr.hu. All rights reserved.

#import <AFNetworking/AFNetworking.h>

@interface XJAFNCliect : AFHTTPSessionManager
//单例初始化
+ (XJAFNCliect *)sharedClient;
//post请求
- (NSURLSessionDataTask *)postRequest:(NSString *)url parameters:(id)parameters completion:( void (^)(id result, NSError *error) )completion;
//get请求
- (NSURLSessionDataTask *)getRequest:(NSString *)url parameters:(id)parameters completion:( void (^)(id result, NSError *error) )completion;
//put请求
- (NSURLSessionDataTask *)putRequest:(NSString *)url parameters:(id)parameters completion:( void (^)(id result, NSError *error) )completion;
//delete请求
- (NSURLSessionDataTask *)deleteRequest:(NSString *)url parameters:(id)parameters completion:( void (^)(id result, NSError *error) )completion;
//上传文件
- (NSURLSessionDataTask *)dataRequest:(NSString *)url parameters:(id)parameters data:(NSData *)data completion:( void (^)(id result, NSError *error) )completion;
//加
- (NSURLSessionDataTask *)dataRequest:(NSString *)url parameters:(id)parameters data:(NSData *)data dataName:(NSString *)dataName completion:( void (^)(id result, NSError *error) )completion;

//上传多张图片
- (NSURLSessionDataTask *)dataRequest:(NSString *)url parameters:(id)parameters datas:(NSArray *)datas dataNames:(NSArray *)dataNames completion:( void (^)(id result, NSError *error) )completion;
//上传多张图片以及语音
- (NSURLSessionDataTask *)imgVoiceRequest:(NSString *)url parameters:(id)parameters datas:(NSArray *)datas Voice:(NSString *)fileUrl completion:( void (^)(id result, NSError *error) )completion;

@end
